package com.zsrt.common.aspect;

import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;

@Component
@Aspect
public class TransactionAspect {
	
	
	public TransactionAspect(){
		System.out.println("------TransactionAspect-------");
	}
	
	
	@Before("execution(* com.zsrt.bbu.*.service.impl.*.*(..))")
	public void qianzhi(JoinPoint jp){
		System.out.println("[2--前置通知--2]检查你权限... 开启事务...");
		
	}
	
	@After("execution(* com.zsrt.bbu.*.service.impl.*.*(..))")
	public void houzhi(JoinPoint jp){
		System.out.println("[3--后置通知--3提交事务 记录日志...");
		
	}

}
